from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()


class Xc(db.Model):
    __tablename__ = "xc"
    id = db.Column(db.Integer,primary_key=True,nullable=False,comment="相册id")
    name = db.Column(db.String(30),comment="相册名称")


class Tp(db.Model):
    __tablename__ = "tp"
    id = db.Column(db.Integer,primary_key=True,nullable=False,comment="图片id")
    url = db.Column(db.String(100),comment="图片路径")
    name = db.Column(db.String(30),comment="图片名称")
    x_id = db.Column(db.Integer,db.ForeignKey('xc.id'))